﻿<!DOCTYPE>
<html>
<head>
    <meta http-equiv="X-UA-Compatible" content="IE=EDGE;IE=11;IE=8,chrome=1" />
    <meta http-equiv="content-type" content="txt/html charset=utf-8" />
    <title>定时任务维护</title>
    <link href="/InSiteWebApplication/Content/Easyui/themes/metro/easyui.css" rel="stylesheet" />
    <link href="/InSiteWebApplication/Content/Easyui/custom-easyui.css" rel="stylesheet" />
    <link href="/InSiteWebApplication/Content/Easyui/themes/icon.css" rel="stylesheet" />
    <style type="text/css">
        .panelSection > .panel > .panel-header
        {
            padding-left: 25px;
        }
        #dg .panelSection > .panel > .panel-header
        {
            padding-left: 5px;
        }
        
        .l-btn2
        {
            border: #d2d2d2 1px solid;
            font-family: Tahoma, Helvetica;
            font-size: 10px;
            cursor: pointer;
            font-weight: 500;
            text-decoration: none;
            height: 26px;
            color: #fff;
            background: #02bfbf;
        }
        .l-btn2:hover
        {
            color: #fff;
            background: #05d2d2;
        }
        
        #dvScheduledTaskLog tbody .datagrid-cell
        {
            overlow: hidden;
            text-overflow: ellipsis;
            white-space: nowrap;
        }
        .lableTextMu
        {
            float: right;
            font-size: 10px;
        }
    </style>
</head>
<body>
    <div class="panelSection" style="">
        <div class="easyui-panel " title="查询区域" style="padding: 3px; width: 100%" data-options="iconCls:'icon-metro-cog',closable:false,collapsible:true,minimizable:false,maximizable:false">
            <div style="margin: 3px 0px 3px 3px">
                <div style="float: left">
                    <div class="divLabel" style="margin-bottom: 5px;">
                        分厂：</div>
                    <input id="ddlFactory" class="easyui-combobox" name="factory" type="text" data-options=""
                        style="width: 125px; height: 22px" />
                </div>
                <div style="float: left; margin-left: 20px">
                    <a href="#" id="btnSearch" class="easyui-linkbutton not-custom" data-options="" style="height: 24px;
                        width: 60px; margin-top: 16px;">查询</a>
                </div>
                <div style="float: left; margin-left: 20px">
                    <a href="#" id="btnReset" class="easyui-linkbutton not-custom" data-options="" style="height: 24px;
                        width: 60px; margin-top: 16px;">重置</a>
                </div>
            </div>
            <div style="clear: both">
            </div>
        </div>
    </div>
    <div class="panelSection" style="">
        <div class="easyui-panel " title="定时任务管理" style="padding: 3px; width: 100%" data-options="iconCls:'icon-metro-settings',closable:false,collapsible:true,minimizable:false,maximizable:false">
            <div id="dvOperateBtn" style="margin: 0 0 3px 3px">
                <a href="javascript:void(0)" id="mb" class="easyui-menubutton" data-options="menu:'#mm'"
                    style="width: 70px;">新增</a>
                <div id="mm" style="width: 150px;">
                    <div id="addApsTask" data-options="iconCls:'icon-add'">
                        自动排产</div>
                    <div class="menu-sep">
                    </div>
                    <div id="addAutoStartTask" data-options="iconCls:'icon-add'">
                        自动开卡</div>
                    <div class="menu-sep">
                    </div>
                    <div id="addTryApsTask" data-options="iconCls:'icon-add'">
                        自动预排产</div>
                    <div class="menu-sep">
                    </div>
                    <div id="addApsShipReceive" data-options="iconCls:'icon-add'">
                        自动排产转工接收</div>
                </div>
                <!-- <a href="javascript:void(0);" id="btnAddTask" class="easyui-linkbutton not-custom l-btn2 "
                    data-options="" style="margin-left: 0px; width: 60px">新增</a> -->
                <a href="javascript:void(0);" id="btnEditTask" class="easyui-linkbutton" data-options=""
                    style="margin-left: 10px; width: 60px">编辑</a> <a href="javascript:void(0);" id="btnManualTaskStart"
                        class="easyui-linkbutton" data-options="" style="margin-left: 10px; width: 80px">
                        手工执行</a> <a href="javascript:void(0);" id="btnManualTaskStop" class="easyui-linkbutton"
                            data-options="" style="margin-left: 10px; width: 80px">手工停止</a> <a href="javascript:void(0);"
                                id="btnDelTask" class="easyui-linkbutton" data-options="" style="margin-left: 10px;
                                width: 60px">删除</a> <a href="javascript:void(0);" id="btnOperaDetail" class="easyui-linkbutton"
                                    data-options="" style="margin-left: 10px; width: 80px">操作日志</a>
            </div>
            <div id="dvScheduledTask" style="">
                <table id="gdScheduledTask" class="easyui-datagrid" style="width: 100%; height: 250px"
                    data-options="rownumbers:true,fitColumns:true,pagination:false,striped:true,checkOnSelect:true,selectOnCheck:true,singleSelect:true,pageNumber:1,pageSize:5,pageList:[5,10,20]">
                </table>
                <div id="pp" style="float: right" class="easyui-pagination" data-options="  
                 layout:['list','first','prev','next','last','manual','info'],              
                    total: 0,
                    showPageList: true,
                    pageSize:10,
                    showPageInfo: false,
                    showRefresh: false,
                    afterPageText:'共&nbsp{pages}&nbsp页',
                    pageList:[5,10,20,50,100,200],
                     buttons:[{
                            iconCls:'',
                            text:'Go',
                            group:'paging-tail-btns',
                            id:'pageGo'
                    }]
                ">
                </div>
            </div>
        </div>
    </div>
    <div class="panelSection" style="">
        <div class="easyui-panel " title="定时任务执行日志" style="padding: 3px; width: 100%" data-options="iconCls:'icon-metro-settings',closable:false,collapsible:true,minimizable:false,maximizable:false">
            <div id="dvScheduledTaskLog">
                <table id="dgScheduledTaskLog" class="easyui-datagrid" style="width: 100%; height: 250px"
                    data-options="rownumbers:true,fitColumns:false,pagination:false,striped:true,checkOnSelect:true,selectOnCheck:true,singleSelect:true,pageNumber:1,pageSize:5,pageList:[5,10,20]">
                </table>
            </div>
        </div>
    </div>
    <div id="dg" style="padding: 0 1px 0 0; display: none">
        <div class="panelSection" style="">
            <div class="easyui-panel " title="基础配置" style="padding: 3px; width: 100%" data-options="closable:false,collapsible:false,minimizable:false,maximizable:false,border:false">
                <form id="dgBaseForm" action="">
                <div style="margin-left: 0px; float: left">
                    <div class="divLabel" style="width: 100px; margin-top: 10px; text-align: right; display: inline-block">
                        任务名称：</div>
                    <select id="popddlTaskName" class="easyui-combobox" name="taskType" data-options="required:true,panelHeight:100"
                        style="width: 148px; height: 22px">
                        <option value="">请选择</option>
                        <option value="1">自动排产</option>
                        <option value="2">自动开卡</option>
                        <option value="8">自动预排产</option>
                        <option value="9">自动排产转工接收</option>
                        <!--任务类型数值取值：定时任务服务中的任务类型中定义-->
                    </select>
                </div>
                <div style="margin-left: 0px; margin-top: 10px; float: left">
                    <div class="divLabel" style="width: 100px; text-align: right; display: inline-block">
                        分厂：</div>
                    <input id="poptxtFactory" name="factory" class="easyui-textbox" type="text" data-options="disabled:true,panelHeight:200,required:true"
                        style="width: 150px; height: 25px" />
                </div>
                <div style="float: left; margin-left: 0px; margin-top: 10px;">
                    <div class="divLabel" style="width: 100px; text-align: right; display: inline-block">
                        开始时间：</div>
                    <input id="poptxtStartDate" name="taskStartDate" type="text" class="easyui-datetimebox"
                        data-options="required:true" style="height: 25px; width: 148px" />
                </div>
                <div style="margin-left: 0px; margin-top: 10px; float: left">
                    <div class="divLabel" style="width: 100px; text-align: right; display: inline-block">
                        重复周期(天)：</div>
                    <input id="txtCycle" name="cycleTime" class="easyui-numberbox" type="text" data-options="panelHeight:200,required:true"
                        style="width: 60px; height: 25px" />
                </div>
                <div style="float: left; margin-left: 0px; margin-top: 10px;">
                    <div class="divLabel" style="width: 100px; text-align: right; display: inline-block">
                        结束日期：</div>
                    <input id="poptxtEndDate" name="taskEndDate" type="text" class="easyui-datetimebox"
                        data-options="required:true" style="height: 25px; width: 148px" />
                </div>
                <div style="margin-left: 0px; margin-top: 8px; float: left">
                    <div class="divLabel" style="width: 100px; text-align: right; display: inline-block">
                        任务描述：</div>
                    <input id="poptxtTaskDesc" name="taskDesc" class="easyui-textbox" type="text" data-options="panelHeight:200,multiline:true"
                        style="width: 148px; height: 30px" />
                </div>
                </form>
            </div>
        </div>
        <div class="panelSection" style="" id="divApsEdit">
            <div class="easyui-panel " title="任务选项" style="padding: 3px; width: 100%" data-options="closable:false,collapsible:false,minimizable:false,maximizable:false,border:false">
                <div style="margin-left: 0px; float: left">
                    <div class="divLabel" style="width: 100px; margin-top: 10px; text-align: right; display: inline-block">
                        排产池：</div>
                    <select id="popddlApsPool" class="easyui-combobox" name="ddlApsPool" type="text"
                        data-options="panelHeight:100,required:true" style="width: 150px; height: 22px">
                    </select>
                </div>
                <div style="clear: both">
                </div>
                <div style="float: left; margin-left: 0px; margin-top: 10px; font-size: 12px;">
                    <div class="divLabel" style="width: 100px; text-align: right; display: inline-block">
                        排产到人员：</div>
                    <input id="cxIsApsToEmp" class="easyui-checkbox" name="" value="" />
                </div>
                <div style="float: left; margin-left: 20px; margin-top: 10px; font-size: 12px;">
                    <div class="divLabel" style="width: 260px; text-align: right; margin-top: 0px; display: inline-block">
                        排产前重算优先级：</div>
                    <input id="cxIsCalPriority" class="easyui-checkbox" name="" value="" labelposition="before" />
                </div>
            </div>
        </div>
        <!--        <div class="panelSection" style="" id="divAutoStartEdit">
            <div class="easyui-panel " title="任务选项" style="padding: 3px; width: 100%" data-options="closable:false,collapsible:false,minimizable:false,maximizable:false,border:false">
                <form id="dgAutoStartForm" action="">
                <div style="margin-left: 0px; float: left">
                    <div class="divLabel" style="width: 100px; margin-top: 10px; text-align: right; display: inline-block">
                        分厂范围：</div>
                    <input id="asFactoryRange" name="factoryRange" class="easyui-tagbox" style="width: 400px; height: 26px" data-options="required:true" />
                </div>
                <div style="margin-left: 0px; float: left">
                    <div class="divLabel" style="width: 100px; margin-top: 10px; text-align: right; display: inline-block">
                        参考类型：</div>
                    <input id="asReferType" name="referType" class="easyui-tagbox" style="width: 400px; height: 26px" data-options="required:true" />
                </div>
                <div class="panelSection">
                    <div class="easyui-panel" title="开卡规则" style="padding: 3px; width: 100%;" data-options="closable:false,collapsible:false,minimizable:false,maximizable:false,border:false">
                    </div>
                </div>
                <div style="margin-left: 0px; float: left">
                    <div class="divLabel" style="width: 100px; margin-top: 10px; text-align: right; display: inline-block">
                        批量加工：</div>
                    <input id="batchProcessRule" name="batchProcessRule" class="easyui-textbox" style="width: 400px; height: 26px" data-options="required:true" />
                </div>
                <div style="margin-left: 0px; float: left">
                    <div class="divLabel" style="width: 100px; margin-top: 10px; text-align: right; display: inline-block">
                        单件单卡：</div>
                    <input id="singleCardRule1" name="singleCardRule1" class="easyui-textbox" style="width: 250px; height: 26px" data-options="required:true" />
                    <label>
                        +</label>
                    <input id="singleCardRule2" name ="singleCardRule2" class="easyui-textbox" style="width: 130px; height: 26px" data-options="required:true" />
                </div>
                <div style="margin-left: 0px; float: left">
                    <div class="divLabel" style="width: 100px; margin-top: 10px; text-align: right; display: inline-block">
                        批量带子序号：</div>
                    <input id="batchChildRule1" name="batchChildRule1" class="easyui-textbox" style="width: 250px; height: 26px" data-options="required:true" />
                    <label>
                        +</label>
                    <input id="batchChildRule2" name="batchChildRule2" class="easyui-textbox" style="width: 130px; height: 26px" data-options="required:true" />
                </div>
                </form>
            </div>
        </div>-->
        <div class="panelSection" style="" id="divAutoTryApsEdit">
            <div class="easyui-panel " title="任务选项" style="padding: 3px; width: 100%" data-options="closable:false,collapsible:false,minimizable:false,maximizable:false,border:false">
                <div style="margin-left: 0px; float: left">
                    <div class="divLabel" style="width: 100px; margin-top: 10px; text-align: right; display: inline-block">
                        排产池：</div>
                    <select id="popddlTryApsPool" class="easyui-combobox" name="ddlApsPool" type="text"
                        data-options="panelHeight:100,required:true" style="width: 150px; height: 22px">
                    </select>
                </div>
                <!--                <div style="float: left; margin-left: 0px; margin-top: 10px; font-size: 12px;">
                    <div class="divLabel" style="width: 100px; text-align: right; display: inline-block">
                        排产到人员：</div>
                    <input id="cxIsTryApsToEmp" class="easyui-checkbox" name="" value="" />
                </div>-->
            </div>
        </div>
        <div class="panelSection" style="margin-top: 5px" id="divShipRevEdit">
            <div class="easyui-panel " title="任务选项" style="padding: 3px; width: 100%" data-options="closable:false,collapsible:false,minimizable:false,maximizable:false,border:false">
                <form id="dgShipRevForm" action="">
                <div style="margin-left: 10px; float: left">
                    <div class="divLabel" style="width: 100px; margin-top: 10px; text-align: right; display: inline-block">
                        接收参考：</div>
                    <select id="asReceiveRefer" name="receiveRefer" class="easyui-combobox" style="width: 400px;
                        height: 26px">
                        <option value="转工计划开始时间">转工计划开始时间</option>
                    </select>
                </div>
                <div style="margin-left: 10px; margin-top: 10px; float: left">
                    <div class="divLabel" style="width: 100px; margin-top: 10px; text-align: right; display: inline-block">
                        覆盖周期：</div>
                    <input id="asRevCoverCycle" name="revCoverCycle" class="easyui-numberbox" style="width: 130px;
                        height: 26px" data-options="required:true" />
                    <div class="divLabel" style="width: 10px; margin-top: 10px; text-align: left; display: inline-block">
                        天</div>
                </div>
                </form>
            </div>
        </div>
        <div style="margin-top: 20px; text-align: right; padding-right: 10px">
            <a href="javascript:void(0);" id="popApsTaskSave" class="easyui-linkbutton not-custom l-btn2 "
                data-options="" style="margin-left: 0px; width: 60px">确定</a> <!--自动排产确认按钮-->
            <a href="javascript:void(0);" id="popAutoStartTaskSave" class="easyui-linkbutton not-custom l-btn2 " 
                data-options="" style="margin-left: 0px; width: 60px">确定</a><!--自动开卡确认按钮-->
            <a href="javascript:void(0);" id="popTryApsTaskSave" class="easyui-linkbutton not-custom l-btn2 " 
                data-options="" style="margin-left: 0px; width: 60px">确定</a> <!--自动预排产确认按钮-->
            <a href="javascript:void(0);" id="popShipApsTaskSave" class="easyui-linkbutton not-custom l-btn2 "
                data-options="" style="margin-left: 0px; width: 60px">确定</a><!--自动转工排产接收确认按钮-->
            <a href="javascript:void(0);" id="popTaskCancel" class="easyui-linkbutton not-custom l-btn2 " 
                data-options="" style="margin-left: 10px; width: 60px">取消</a><!--统一的关闭按钮-->
        </div>
    </div>
    <div id="dgOperaLog" style="display: none">
        <div class="dvgrid-cellwarp" style="background: #fff; margin: 3px 0px 3px 3px">
            <table id="operaLogTable" class="easyui-datagrid" data-options="rownumbers:true,fitColumns:true">
            </table>
        </div>
    </div>
</body>
</html>
<script src="/InSiteWebApplication/Scripts/CustomPageJs/ReferenceJsLib.js" type="text/javascript"></script>
<script src="/InSiteWebApplication/Content/Easyui/jquery.min.js" type="text/javascript"></script>
<script src="/InSiteWebApplication/Content/Easyui/jquery.easyui.min.js" type="text/javascript"></script>
<script src="/InSiteWebApplication/Content/Easyui/easyui-lang-zh_CN.js" type="text/javascript"></script>
<script src="/InSiteWebApplication/Scripts/CustomPageJs/CustomCommon.js" type="text/javascript"></script>
<script type="text/javascript">
    document.write('<script src="/InSiteWebApplication/Scripts/ApsJs/ScheduledTaskMaintPage.js?v=' + new Date().getTime() + '" type="text/javascript" ><\/script>');
</script>
